//
//  USChatMenuView.h
//  us
//
//  Created by karry on 2025/4/17.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, US_ChatMenuItemType) {
    US_ChatMenuItemTypeCancel,
    US_ChatMenuItemTypeCopy,
    US_ChatMenuItemTypeDelete,
    US_ChatMenuItemTypeSave,
    US_ChatMenuItemTypeRecall,
    US_ChatMenuItemTypeReDownload,
    US_ChatMenuItemTypeFeedback,
    US_ChatMenuItemTypeAddExpression,
    US_ChatMenuItemTypeCopyAll,
    US_ChatMenuItemTypeYinyong,
};

@interface USChatMenuView : UIView

@property (nonatomic, assign, readonly)BOOL isShow;
@property (nonatomic, assign)EMMessageBodyType messageType;
@property (nonatomic, copy)void (^actionBlcok)();

@property (nonatomic, strong) NSArray<UIMenuItem *> *menuItems;

- (void)showInView:(UIView *)view withMessageModel:(EMChatMessage *)model rect:(CGRect)rect actionBlock:(void (^)(US_ChatMenuItemType))actionBlock;

- (void)dismiss;
+ (NSArray<UIMenuItem *> *)getTextViewMenuItems:(EMChatMessage *)model;
+ (void)setChatDetMenuController;
+ (BOOL)canPerformAction:(SEL)action menuItems:(NSArray<UIMenuItem *> *)items;

@end

NS_ASSUME_NONNULL_END
